const s = new Set()
s.add(1).add(5).add(80).add(8).add(4)
// s.forEach((val)=>console.log(val))

console.log(s.size)
console.log(s.has(100))
console.log(s.delete(8))
console.log(s)
s.clear()
console.log(s)

// 数组去重
const arr=[1,2,1,3,5,2,2,1]
let result = new Set(arr)
console.log(result)
result = Array.from( new Set(arr))
console.log(result)
// 使用...展开
result = [...new Set(arr)]
console.log(result)
